package com.anli.web;

import com.anli.xianliu.LimitInterface;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/3/8  8:15
 * 描述:
 */

@RestController
public class TestXianLiuController {

    public static int count=0;

    @RequestMapping("xianLiu")
    @LimitInterface(limitKey = "xianLiu",limitRate = 5,limitExpire = 3)
    public Object xianLiu(){

        count++;

        System.out.println("=======请求次数=========="+count);

        return count;
    }

    @RequestMapping("xianLiu2")
    public Object xinaliu2(){

        return null;
    }

}
